package org.dromara.system.domain.bo.xiangpay;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class XiangPushBo {

    private Address billing; // 账单地址
    private Address delivery; // 送货地址
    private List<Product> products; // 商品信息
    private Info info; // 订单信息
    private String sign; // 签名

    @Data
    public static class Info {
        String oid; //订单号
        Long datetime; //下单时间戳
        String total; //总金额
        String currency; //币种
        String country; //客户国家
        String payment_type; //固定值 信用卡:credit, 贝宝:paypal
        String email; //客户邮箱
        String secret_key; //秘钥
        String useragent; //浏览器UA
        String language; //浏览器语种
        String domain; //下单域名
        String return_url; //成功返回地址
        String cancel_url; //失败返回地址
        String notify_url; //异步通知地址
        String customer_ip; //客户IP
        Integer model; //check接口获取的通道模式,系统对接固定为10
    }

    @Data
    public static class Address  {
        private String firstname;
        private String lastname;
        private String address1;
        private String address2;
        private String city;
        private String state;
        private String zip;
        private String country;
        private String phone;
    }

    @Data
    public static class Product {
        private String name;
        private String image;
        private String attribute;
        private Integer qty;
        private BigDecimal price;
        private String link;
    }
}
